package code.c01;

import java.util.Scanner;

/**
 * @author thinkpad - 83start
 * @version v1.0
 * @create 2022/9/1 12:02
 * @package PACKAGE_NAME
 * @description 
 */

public class GuessTheNumber {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        System.out.println("请输入数字1：");
        int num1 = scanner.nextInt();
        System.out.println("请输入数字2：");
        int num2 = scanner.nextInt();

        System.out.println("请输入你的答案：");
        int answer = scanner.nextInt();

        if ((num1 + num2) == answer){
            System.out.println("恭喜你答对了");
        }else {
            System.out.println("你打错了");
        };
    }
}
